import java.util.Iterator;

public class 矩阵成绩 {
	public static void main(String[] args) {
		int[][] a = {{1,2,3},{4,5,6}}; //2 X 3
		int[][] b = {{1,2,3,5},{2,4,6,8},{1,2,3,4}}; //3X4
		int[][] c = new int[2][4];
		
		
		for (int i = 0; i < a.length; i++) {//2
			for (int j = 0; j < a[i].length; j++) {//3
				for (int k = 0; k < b[i].length; k++) {//4
					c[i][k] += a[i][j]*b[j][k];
				}
			}
		}
		
		for (int[] is : c) {
			for (int is2 : is) {
				System.out.print(is2 + "\t");
			}
			System.out.println();
		}
	}
}
